#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
	ll n, a, b, c;
	cin >> n;
	cin >> a >> b >> c;
	if (n > 3)
	{
		if (n > 5)
			cout << "art" << endl;
		else
		{
			if (b < c)
				cout << "comprehensive" << endl;
			else if (c < b)
				cout << "art" << endl;
		}
	}
	else
	{
		ll t = 0;
		t = min({ a,b,c });
		if (t == a)
			cout << "library" << endl;
		else if(t==b)
			cout << "comprehensive" << endl;
		else if(t==c)
			cout << "art" << endl;
	}
	return 0;
}